1. Field of the Invention
The present invention relates to wireless communication apparatuses such as the Personal Handy Phone System (PHS) and cellular phones.
2. Description of the Related Art
It is known that information including positional-record information and area information based on the unified standards of the Association of Radio Industries and Businesses (ARIB) is provided to wireless portable communication apparatuses such as the PHS and a mobile telephone through wireless communications between a base station and the apparatuses. The positional-record information and area information are, for example, stored in a flash memory 2 contained in a wireless communication apparatus 1 shown in FIG. 4.
The flash memory 2 described above is a non-volatile memory, and for example, includes a program-storing region 2a for storing a communication program of the wireless communication apparatus 1 and a data-storing region 2b for storing data as information. In the data-storing region 2b, a plurality of sectors 3 is formed to be partitioned for storing one or more pieces of information. One of the sectors 3, for example, a sector 3a, stores the aforementioned positional-record information.
When a user carries the wireless communication apparatus 1 with him, and the communication area corresponding to the apparatus 1 changes, an operation for recording the new position is performed. In order to record the new position, the positional-record information concerning the new communication area obtained after moving from the previous position is transmitted to the wireless communication apparatus 1 from a base station in order to update the apparatus 1. Then, the wireless communication apparatus 1 stores and updates the received positional-record information. In other words, the wireless communication apparatus 1 receives the positional-record information via an antenna 5, and passes the received information through a radio-frequency unit (RFU) 6 and a base band integrated circuit (BBIC) 7 in sequence to transmit to a control unit (CPU) 8. After this, the CPU 8 updates the positional-record information of the flash memory 2 with the received update information.
However, because of the nature of a flash memory, all the information stored in every sector is eliminated when the flash memory 2 is updated. Therefore, it is impossible to eliminate only the positional-record information stored in the sector 3a among the plurality of items of information stored in the aforementioned flash memory 2. Furthermore, in the conventional apparatus 1, only the one sector 3a is allocated for storing the positional-record information, as described above. Consequently, it takes excessive time to complete updating of the positional-record information after the updating operation is started.
As a result, under the condition in which only the one sector 3a is used for storing the positional-record information, updating of the positional-record information must be performed by the following steps.
According to a first example, when the positional-record information for updating is given to the CPU 8, the CPU 8 first reads out all the stored information from the flash memory 2, including the positional-record information from the sector 3a, and writes or copies the read-out information in a RAM 10.
In the RAM 10, based on the updated positional-record information, the CPU 8 modifies the content of the positional-record information included in the information copied from the sector 3a, which is hereinafter referred to as the copied information from the sector 3a, to create modified positional-record information. Meanwhile, after the information stored in the sector 3a has been copied in the RAM 10, as described above, the CPU 8 eliminates all the information stored in the sector 3a of the flash memory 2.
Then, when the sector 3a becomes empty after elimination of the information stored in the sector 3a is completed, the CPU 8 stores the modified positional-record information modified in the RAM 10 into the sector 3a, with the result that updating of the positional-record information is completed.
Following is another example of a process for updating the positional-record information. First, when the positional-record information for updating is given to the CPU 8, in the very first step, only when there is no copied information from the sector 3a in the RAM 10, the CPU 8, as described above, reads out all the stored information including the positional-record information from the sector 3a, and copies the read-out information in the RAM 10. Then, as in the first example described above, the CPU 8 performs updating of the positional-record information.
However, after the updating of the positional-record information in the flash memory 2 has been completed, the copied information of the sector 3a in the RAM 10 and the stored information of the sector 3a in the flash memory 2 are the same. Therefore, in this case it is unnecessary to copy the positional-record information stored in the sector 3a into the RAM 10. Instead, when the positional-record information for updating is given to the CPU 8, the CPU 8, from the beginning, updates the positional-record information among the information copied from the sector 3a already stored in the RAM 10, based on the given updated positional-record information, and similarly, updates the positional-record information of the flash memory 2, without first reading out the stored information from the sector 3a to copy in the RAM 10.
As described above, in the conventional wireless communication apparatus, by the time updating and storing of the positional-record information for updating in the sector 3a of the flash memory 2 is completed after starting of updating thereof, the stored information of the sector 3a of the flash memory 2 must be eliminated without fail. Since it takes a long time to eliminate the stored information of the sector 3a, it is necessary to take plenty of time during the period between the start of updating the information and the completion thereof. However, this is inconvenient for the user of the apparatus, since the CPU 8 cannot perform any other processing during such a time-consuming operation for updating the positional-record information.
Accordingly, it is an object of the present invention to solve the above problems and provide a wireless communication apparatus capable of reducing time required for updating updatable information such as positional-record information and area information.
To this end, according to an aspect of the present invention, there is provided a wireless communication apparatus including: (1) a non-volatile flash memory in which a plurality of sectors capable of storing one or more pieces of information are formed to be partitioned, the flash memory eliminating the information stored in every sector; (2) a sector controlling unit for controlling the 4 sectors in such a manner that at least one of the plurality of the sectors stores updatable information, and at least one of the remaining sectors has no information so that the sector becomes empty; (3) an update controlling unit for updating and storing the updatable information in a specified empty sector of the plurality of the sectors after receiving a command for updating the updatable information; and (4) an information-elimination controlling unit for eliminating the information stored in the sector storing the pre-update information based on a command given from the sector controlling unit so as to make the sector empty after updating and storing of the updatable information is completed.
In addition, the above wireless communication apparatus, may further include: (1) an information reading unit for reading out all the information stored in the sector having the updatable information as an object targeted for updating, based on the command from the update controlling unit, when the command for updating the updatable information is received; (2) an information modifying unit for modifying the read-out updatable information; and (3) an information writing unit for updating and storing all the information including the modified updatable information stored in the sector in a specified empty sector of the plurality of sectors.
In addition, in the wireless communication apparatus described above, the updatable information may be one of positional-record information and area information concerning the wireless communication apparatus.
Furthermore, in the wireless communication apparatus described above, the information-elimination control unit may eliminate the information stored in the sector targeted for information elimination during an idle period in which the wireless communication apparatus is not performing information processing.
In the wireless communication apparatus described above, by the sector controlling unit, in addition to the sector for storing updatable information, the empty sector for updating/storing the updatable information for updating is provided. With this arrangement, for example, when a command for updating updatable information such as positional-record information is given, the update controlling unit updates/stores the updatable information for updating in the empty sector without performing the time-consuming elimination of the stored information of the sector.
In this way, according to the wireless communication apparatus of the present invention, it is not necessary to eliminate the information stored in the sector by the time updating and storing of the updatable information in the flash memory is completed after receiving the command for updating the updatable information. This arrangement permits time necessary for updating the updatable information to be greatly reduced.